package com.example.zhu.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Orders implements Serializable {
    /**
     * 订单状态 -1代支付 0已取消 1待接单 2已接单 3已取单 4已送达 5已完成
     */
    public static final Integer NoPay = -1;
    public static final Integer CANCELLED = 0;
    public static final Integer TO_BE_CONFIRMED = 1;
    public static final Integer COLLECTED= 2;
    public static final Integer RECEIVED = 3;
    public static final Integer REACHED = 4;
    public static final Integer COMPLETED = 5;


    //主键
    private Long id;
    //订单号
    private Long number;
    //下单类型
    private Integer productId;
    //实收金额
    private Double amount;
    //订单状态
    private Integer orderStatus;
    //用户唯一标识
    private String openid;
    //下单时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    //修改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    //期待送到时间
    private String expectTime;
    //完成时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishTime;
    //取件地址
    private String takeAddress;

    //取件信息
    private String packageInfo;

    //备注
    private String remark;

    //电话号
    private String phone;

    //送达地址
    private String address;

    //图片
    private String image;

    //送达图片
    private String imageOver;

    //快递件数
    private Integer count;

    //订单类型
    private String OrderType;

    //错误信息
    private String errorMsg;

    private Boolean judged;

}
